/*
 * @Author: liyongxuan
 * @Date: 2018-04-26 14:36:37
 * @description: 事件 --> 三方中介
*/

import Api from '../../../api/event/eventAgencyController.api';
import { apiHttp } from '../../apiHttp';
import { JsonResult, EventAgencyDto } from '../../../api/Interface';
import { EventPublicSearchDto } from '../Interface';

export default {
  // 删除三方中介
  delEventAgency: async (id: string): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.deleteEventAgency, { id });
    return res;
  },
  // 获取三方中介列表
  getEventAgencyPage: async (eventAgencySearchDto: EventPublicSearchDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.eventAgencyPage, eventAgencySearchDto);
    return res;
  },
  // 添加三方中介
  addSaveEventAgency: async (eventAgencyDto: EventAgencyDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.saveEventAgency, eventAgencyDto);
    return res;
  },
  // 编辑三方中介
  updateEventAgency: async (eventAgencyDto: EventAgencyDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.updateEventAgency, eventAgencyDto);
    return res;
  }
};
